﻿
namespace System.Linq.Functional
{
    class IImmutableListExamples
    {
        static void Example()
        {
            // Calculate list length
            var enumerator = Enumerable.Range(1, 10).GetEnumerator();
            var list = LazyList<int>.Create(enumerator);
            var length = list.Length();
            var sum = list.Sum();
            var last = list.Last();
            Console.WriteLine("List length: {0}", length);
            Console.WriteLine("List sum: {0}", sum);
            Console.WriteLine("Last value: {0}", last);
        }
    }
}
